package com.liqi.monitor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.liqi.common.utils.DateUtils;
import com.liqi.monitor.domain.DvDeploymentDiskInfo;
import com.liqi.monitor.domain.DvDeploymentPatrol;
import com.liqi.monitor.mapper.DvDeploymentPatrolMapper;
import com.liqi.monitor.service.IDvDeploymentPatrolService;


/**
 * 设备部署巡检Service业务层处理
 * 
 * @author fucx
 * @date 2022-10-24
 */
@Service
public class DvDeploymentPatrolServiceImpl implements IDvDeploymentPatrolService 
{
    @Autowired
    private DvDeploymentPatrolMapper dvDeploymentPatrolMapper;

    /**
     * 查询设备部署巡检
     * 
     * @param id 设备部署巡检主键
     * @return 设备部署巡检
     */
    @Override
    public DvDeploymentPatrol selectDvDeploymentPatrolById(Long id)
    {
        return dvDeploymentPatrolMapper.selectDvDeploymentPatrolById(id);
    }

    /**
     * 查询设备部署巡检列表
     * 
     * @param dvDeploymentPatrol 设备部署巡检
     * @return 设备部署巡检
     */
    @Override
    public List<DvDeploymentPatrol> selectDvDeploymentPatrolList(DvDeploymentPatrol dvDeploymentPatrol)
    {
        return dvDeploymentPatrolMapper.selectDvDeploymentPatrolList(dvDeploymentPatrol);
    }

    /**
     * 新增设备部署巡检
     * 
     * @param dvDeploymentPatrol 设备部署巡检
     * @return 结果
     */
    @Override
    public int insertDvDeploymentPatrol(DvDeploymentPatrol dvDeploymentPatrol)
    {
        dvDeploymentPatrol.setCreateTime(DateUtils.getNowDate());
        return dvDeploymentPatrolMapper.insertDvDeploymentPatrol(dvDeploymentPatrol);
    }

    /**
     * 修改设备部署巡检
     * 
     * @param dvDeploymentPatrol 设备部署巡检
     * @return 结果
     */
    @Override
    public int updateDvDeploymentPatrol(DvDeploymentPatrol dvDeploymentPatrol)
    {
        dvDeploymentPatrol.setUpdateTime(DateUtils.getNowDate());
        return dvDeploymentPatrolMapper.updateDvDeploymentPatrol(dvDeploymentPatrol);
    }

    /**
     * 批量删除设备部署巡检
     * 
     * @param ids 需要删除的设备部署巡检主键
     * @return 结果
     */
    @Override
    public int deleteDvDeploymentPatrolByIds(Long[] ids)
    {
        return dvDeploymentPatrolMapper.deleteDvDeploymentPatrolByIds(ids);
    }

    /**
     * 删除设备部署巡检信息
     * 
     * @param id 设备部署巡检主键
     * @return 结果
     */
    @Override
    public int deleteDvDeploymentPatrolById(Long id)
    {
        return dvDeploymentPatrolMapper.deleteDvDeploymentPatrolById(id);
    }


}
